package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 车牌管理
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_plate")
public class Plate extends Model<Plate> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "plate_number", type = IdType.ASSIGN_ID)
    private String plateNumber;
    /**
     * 车辆类型:0燃油车 1纯电 2插混
     */
    @TableField("car_type")
    private Integer carType;
    /**
     * 是否支持etc扣费
     */
    @TableField("etc_pay")
    private String etcPay;
    /**
     * 车牌颜色
     */
    @TableField("vehicle_color")
    private Integer vehicleColor;
    /**
     * ETC卡号
     */
    @TableField("etc_card_id")
    private String etcCardId;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;

    public void freeData() {
        this.plateNumber = null;
        this.carType = null;
        this.etcPay = null;
        this.vehicleColor = null;
        this.etcCardId = null;
        this.addTime = null;
    }

}
